const toString = Object.prototype.toString
export function is (val: any, type: string) {
    return toString.call(val) === `[object ${type}]`
}

/**
 * 传入图片地址获取完整地址
 * @param url
 */
export const getImageUrl = (url: string) => {
    return import.meta.env.VITE_APP_FILE_API + url;
}

export function isNumber (val: any) {
    return is(val, 'Number')
}
